Skip to main content

Unit 4 Exercise 8

Exercise 8: SubSchedule Daily and Monthly Process

Objective

To use Negative Frequency to prevent 2 container jobs from being built on the same day.

Summary

In a single schedule called, NightlyProcessing, you will have 2 container jobs each calling a unique sub-schedule, SS_Daily and SS-Monthly. One container called, Daily, will run every day except for the end of the month. The other called, Monthly, will run only at end of month.

Instructions

Create the Sub-Schedules

  1. In Library > Administration, select Master Schedules.
  2. Using the filters, locate and select SS-Repeating.
  3. Click Copy.
  4. In the Copy Schedule pop-up window:
  • In the New Schedule Name field, enter SS-Daily
  • Uncheck Navigate to the Studio page after copy.
  • Leave Copy Jobs selected
  • Leave Copy schedule privileges selected.
  • Click OK.
  1. Repeat Steps 2-4 to create a new sub-schedule called, SS-Monthly.

Add Jobs to SS-Monthly

  1. Using the filters, locate and select SS-Monthly.
  2. Click the View.
  3. Utilizing the Copy function, copy Job 1 two times to create Job 6 and Job 7.
  4. Add Dependencies to have the new jobs run after Job 5 in sequential order.
  • Job 1 Job 2 Job 3 Job 4 Job 5 Job 6 Job 7
  1. Click Back until you return the Schedule List

Create the Primary Schedule

  1. In Studio.
  2. Click Add.
  3. On the Master Schedule Definition screen:
  • In the Name field, enter NightlyProcessing.
  • In the Documentation field, enter This is the Main Schedule.
  • In the Start Offset Hours box, enter 19 (19:00 or 07:00 PM).
  • In the Work Days section, select Saturday and Sunday.
  • In the Holiday Calendar Settings, select Use Master Holiday.
  • Select Auto Build and set it as 7 days in advance for 1.
  • Select Auto Delete and set it as 7.
  • Click the Save button.
  1. Click Back

Add the Daily Container to the Schedule

  1. In Studio, select the NightlyProcessing and click the View button.
  2. Select Add Job in the side menu.
  3. On the Master Job Definition Screen:
  • In the Name field, enter Daily.
  • In the Job Type drop-down, select Container.
  • In the Master SubSchedule dropdown list select the SS-Daily.
  • Click the Save button.
  • Click the Lock icon in the upper right-hand corner.
  • In the Documentation field, enter in some documentation.
    • Example: This is a container Job that has the Daily Jobs.
  • Scroll to and expand the Frequency box.
  • Select the EOM-O Frequency and move it from the Inactive list to the Active list.
  • Select the Mon-Sun-O Frequency and move it from the Inactive list to the Active list.
  • Select the EOM-O in the Active column and give it a Job Build Status of Do Not Schedule.
  • Click the Save button.
  1. Click Back

Add the Monthly Container to the Schedule

  1. In Studio, select Add Job in the side menu.
  2. Click the Add button.
  3. On the Master Job Definition Screen:
  • In the Name field, enter Monthly.
  • In the Job Type dropdown, select Container.
  • In the Master SubSchedule dropdown, select the SS-Monthly.
  • Click the Save button.
  • Click the Lock icon in the upper right-hand corner.
  • In the Documentation field, enter in some documentation.
    • Example: This is a container Job that has the Monthly Jobs.
  • Scroll to and expand the Frequency box.
  • Select the EOM-O Frequency and move it from the Inactive list to the Active list.
  1. Click the Save button.

Build the Schedule

  1. In Operations, select Schedule Build.
  2. On the Schedule Build screen:
  • In the Schedule Date section, select today's dates for From and the end of the month for To using the Calendar Icon.
  • In Schedule Build section, select the Released option .
  • In the Schedule List, select NightlyProcessing.
  • Click the Build button.
  • On the Build Results screen, click Back.
  1. On the Operations Summary screen, click on Processes.
  2. Locate today's date and select it.
note
  • Notice that:
    • The schedule isn't running because the Start Time is 7:00PM.
    • That only the Daily job was built.
    • That only the SS-Daily sub-schedule is in the Schedule Selection list.
  1. Locate the date for the end of the month and select it.
note
  • Notice that:
    • The schedule isn't running because the Start Time is 7:00PM.
    • That only the Monthly job was built.
    • That only the SS-Monthly sub-schedule is in the Schedule Selection list.
  1. Force Start today's Nightly Processing schedule to allow the jobs in the sub-schedule to run.

Enterprise Manager

Details

Create the first SubSchedule (Daily)

  1. Under the Administration topic, Double-Click on Schedule Master.
  2. Click the Add button on the Schedule Master toolbar.
  3. In the Name field, enter SS-Daily.
  4. In the Documentation field, enter This is the Daily SubSchedule.
  5. In the Start Time box, notice the default of 00:00 (midnight).
  6. Keep Monday through Friday selected for the Workdays per Week for the Schedule to run.
  7. In the Schedule Properties frame, mark the SubSchedule checkbox.
  8. Click the Save button on the Schedule Master toolbar.

Create the SubSchedule (Monthly)

  1. Under the Administration topic, Double-Click on Schedule Master (if not open).
  2. Click the Add button on the Schedule Master toolbar.
  3. In the Name field, enter SS-Monthly.
  4. In the Documentation field, enter This is the Monthly SubSchedule.
  5. In the Start Time box, notice the default of 00:00 (midnight).
  6. Keep Monday through Friday selected for the Workdays per Week for the Schedule to run.
  7. In the Schedule Properties frame, mark the SubSchedule checkbox.
  8. Click the Save button on the Schedule Master toolbar.
  9. Close the Schedule Master tab.

Add Jobs within the Daily SubSchedule

  1. Under the Administration topic, Double-Click on Job Master. Select the SS-Daily.
  2. Click the Add button on the Job Master toolbar.
  3. In the Name field, enter Daily Job 1.
  4. In the Job Type drop-down list, select Windows.
  5. In the Primary Machine drop-down list, select the SMATraining machine.
  6. In the User ID drop-down list, select SMATRAINING\SMAUSER.
  7. In the Command Line, use Ctrl+F and select the command line that looks like this: "[[MI.PathWindows]]\genericp.exe" -t[[SI.RUNTIME]] -e0
  8. Click the Save button on the Job Master toolbar.
  9. Click the Frequency tab.
  10. Within the Frequency list frame, click the Add button.
  11. Click inside the option button to Use existing Frequency.
  12. In the Frequency drop-down list, select Mon-Fri-N.
  13. Click Next.
  14. Click the Finish button.
  15. On the Job Master Toolbar, click the Copy button or press Ctrl+Insert).
  16. Name the Job Daily Job 2.
  17. Click OK.
  18. Repeat steps 32 to 34 to create Jobs Daily Job 3, Daily Job 4, and Daily Job 5.
  19. Close the Job Master.
  20. Use Workflow Designer to create Job Dependencies the way you want and then close Workflow Designer.

Add Jobs within the Monthly SubSchedule

  1. Under the Administration topic, Double-Click on Job Master. Select the SS-Monthly.
  2. Click the Add button on the Job Master toolbar.
  3. In the Name field, enter Monthly Job 1.
  4. In the Job Type drop-down list, select Windows.
  5. In the Primary Machine drop-down list, select the SMATraining machine.
  6. In the User ID drop-down list, select SMATRAINING\SMAUSER.
  7. In the Command Line, type Ctrl+F and select the command line that looks like this: "[[MI.PathWindows]]\genericp.exe" -t[[SI.RUNTIME]] -e0
  8. Click the Save button on the Job Master toolbar.
  9. Click the Frequency tab.
  10. Within the Frequency list frame, click the Add button.
  11. Create a new Frequency. The name will be End-of-Month-B. Click Next.
  12. In the Frequency Definition Wizard, select End of Period in When to Schedule frame, be sure that Month is selected under Periods frame and Before Date is selected under A/O/B/N frame.
  13. Click the Finish button.
  14. On the Job Master Toolbar, click the Copy button or press Ctrl+Insert.
  15. Name the Job Monthly Job 2.
  16. Click OK.
  17. Repeat steps 51 to 53 to create Jobs Monthly Job 3, Monthly Job 4, Monthly Job 5, Monthly Job 6, and Monthly Job 7.
  18. Close the Job Master tab.
  19. Use Workflow Designer to create Job Dependencies.
  20. Close the Workflow Designer.

Create the Primary Schedule

  1. Under the Administration topic, Double-Click on Schedule Master.
  2. Click the Add button on the Schedule Master toolbar.
  3. In the Name field, enter Main-Schedule.
  4. In the Documentation field, enter This is the Main Schedule.
  5. In the Start Time box, notice the default of 00:00 (midnight).
  6. Keep Monday through Friday selected for the Workdays per Week for the Schedule to run.
  7. Click the Save button on the Schedule Master toolbar.
  8. Close the Schedule Master tab.
  9. Under the Administration topic, Double-Click on Job Master.

Add the Daily SubSchedule to the Primary Schedule

  1. Select the Main-Schedule from the Schedule drop-down list.
  2. Click the Add button on the Job Master toolbar.
  3. In the Name field, enter Daily-Jobs.
  4. In the Job Type drop-down list, select Container.
  5. On the Schedule to run as SubSchedule drop-down list select the SS-Daily.
  6. Click the Save button on the Job Master toolbar.
  7. Click the Frequency tab.
  8. Within the Frequency list frame, click the Add button.
  9. Click inside the option button to Use existing Frequency.
  10. In the Frequency drop-down list, select Mon-Fri-N.
  11. Click Next and then Finish.
  12. Click the Instance Definition tab.
  13. Click in the Define Property Values box.
  14. Enter: RUNTIME=10
  15. Click the Add at the right-middle of the screen.
  16. Click the Save button on the Job Master toolbar.
  17. In the Documentation field, enter This is a container Job that has the Daily Jobs.
  18. Click the Save button on the Job Master toolbar.
  19. Still on Job Master, be sure you have the Main-Schedule selected.

Add the Monthly SubSchedule to the Primary Schedule

  1. Click the Add button on the Job Master toolbar.
  2. In the Name field, enter Monthly-Jobs.
  3. In the Job Type drop-down list, select Container.
  4. On the Schedule to run as SubSchedule drop-down list select the SS-Monthly.
  5. Click the Save button or on the Job Master toolbar or press Ctrl+S.
  6. Click the Frequency tab.
  7. Within the Frequency list frame, click the Add button.
  8. Click inside the option button to Use Existing Frequency.
  9. Select End-of-Month-B from the drop-down list.
  10. Click Next.
  11. Click the Forecast button and note that on the months noted above that the Job will run on the Friday before the end of the month if it falls on a weekend.
  12. Close the Forecast dialog box and then click Finish on the Frequency Definition Wizard screen.
  13. Click the Instance Definition tab.
  14. Click in the Define Property Values box.
  15. Enter: RUNTIME=20.
  16. Click the Add at the right side of the Define Property Values frame.
  17. Click the Save button on the Job Master toolbar.
  18. Close the Job Master tab.

Setup Job Dependencies between Container Jobs

  1. Under the Administration topic, Double-Click Workflow Designer.
  2. Select Main-Schedule under the Select Schedule drop-down list.
  3. Click the Add Dependency tool.
  4. Click the Daily-Jobs box and then click the Monthly-Jobs.
  5. Select Excludes under the Dependency type.
  6. Click OK.
  7. Close the Workflow Designer tab.

Build the Schedule

  1. Under the Operation topic, Double-Click Schedule Build.
* Notice that **both SubSchedules _ARE NOT_ shown in the Schedule Selection** list.  
  1. Click the Main-Schedule and click the Build button.
  2. On the Build Properties screen, leave On Hold selected and click OK.
* This will build the Schedule **On Hold** for today  
  1. Click the Main-Schedule again.
  2. On the Start date, select the last working day of the month.
* The **Stop date** should be the same as **Start date**.  
  1. Click the Build button.
  2. On the Build Properties screen, leave Released selected and click OK.
* This will build the Schedule **Released for the end of the month**.  
  1. Close the Build Schedules screen.
  2. Go to the List or Matrix view under the Operation topic or use Solution Manager to check the results.
  3. Release the Schedule for today (if you want to see the Jobs running).